
#define PyUnicode_ENDSWITH(o, s) PyUnicode_Tailmatch((o), (s), 0, PY_SSIZE_T_MAX, 1)
#define PyUnicode_STARTSWITH(o, s) PyUnicode_Tailmatch((o), (s), 0, PY_SSIZE_T_MAX, -1)
#define PyUnicode_ADDLINEBREAK(s, b) \
	PyUnicode_ENDSWITH((s), (b)) == 1 ?\
		(s) : PyUnicode_Concat((s), (b))
#if 0
	do { \
		if (PyUnicode_ENDSWITH((s), (b)) != 1) {\
			s = PyUnicode_Concat((s), (b));\
	   	}}while(0)
#endif

int start_intersection(int s1, int e1, int s2, int e2);
int end_intersection(int s1, int e1, int s2, int e2);
int seg_union(int *start1, int *end1, int start2, int end2);
char *show_bytes(void *str, int len);
int wcwidth(wchar_t ucs);
int wcswidth(const wchar_t *pwcs, size_t n);
int wcswidth_cjk(const wchar_t *pwcs, size_t n);
PyObject *PyUnicode_Insert(PyObject *self, Py_ssize_t pos, PyObject *ins);
PyObject *myprint(PyObject *obj);
